package top.v5it.japi.plus.data.jdbc.service.support;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.support.TransactionTemplate;
import top.v5it.japi.plus.data.jdbc.repository.JapiJdbcAndMybatisRepository;
import top.v5it.japi.plus.data.jdbc.service.JapiMybatisService;
import top.v5it.japi.plus.data.jdbc.service.JapiJdbcService;

/**
 * @author zhanpu
 * @date 2022/8/3
 */
public class JapiMybatisSimpleService<J extends JapiJdbcAndMybatisRepository<T, ID>, T, ID> implements JapiMybatisService<T, ID>, JapiJdbcService<T, ID> {

    @Autowired
    protected J japiRepository;

    @Autowired
    private TransactionTemplate transactionTemplate;

    @Override
    public JapiJdbcAndMybatisRepository<T, ID> getJapiRepository() {
        return japiRepository;
    }

    @Override
    public TransactionTemplate getTransactionTemplate() {
        return transactionTemplate;
    }
}
